package com.lvmama.client.dw;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.github.pagehelper.PageInfo;
import com.lvmama.common.result.Result;
import com.lvmama.common.utils.PageInfoUtil;
import com.lvmama.pojo.dto.dw.StockDetailQuery;
import com.lvmama.pojo.entity.dw.priceStock.StockDetail;

/**
 * @Author:xuzhongwei
 * @Description:
 * @Date：2018/08/07
 */
@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface StockClient {

    /**
     * 查询库存详情
     *
     * @param query 查询条件
     * @return 库存详情
     */
	@RequestMapping(method = RequestMethod.POST, value = "/stock/selectStockDetail", consumes = "application/json")
	Result<List<StockDetail>> selectStockDetail(@RequestBody StockDetailQuery query);
	
    /**
     * 查询库存详情
     *
     * @param query 查询条件
     * @return 库存详情
     */
	@RequestMapping(method = RequestMethod.POST, value = "/stock/selectStockDetailRedis", consumes = "application/json")
	Result<List<StockDetail>> selectStockDetailRedis(@RequestBody StockDetailQuery query);

    /**
     * 查询库存详情分页
     *
     * @param query 查询条件
     * @return 库存详情分页
     */
	@RequestMapping(method = RequestMethod.POST, value = "/stock/selectStockDetailPage", consumes = "application/json")
	Result<PageInfo<StockDetail>> selectStockDetailPage(@RequestBody StockDetailQuery query);

    /**
     * 查询库存详情分页
     *
     * @param query 查询条件
     * @return 库存详情分页
     */
	@RequestMapping(method = RequestMethod.POST, value = "/stock/selectStockDetailPageByRedis", consumes = "application/json")
	Result<PageInfoUtil<StockDetail>> selectStockDetailPageByRedis(@RequestBody StockDetailQuery query);
}
